<!DOCTYPE html>
<html>
<head>
    <title>压力管道</title>
    #parse("sys/header.html")
    <style>
        .ui-jqgrid {
            width: 100%;
            float: right;
        }
        .ui-jqgrid .ui-jqgrid-bdiv {
            border-top: 1px solid #E1E1E1;
            overflow-x: auto;
        }
        .frozen-div, .frozen-bdiv {
            background-color: #E4E6E9;/*与网页背景色一致*/ */
        }
        .sugon_upload_btn {
            display: -webkit-inline-box;
            display: inline-block;
        }

        .leftHeight{
            height: 85vh;
            overflow: auto;
        }
        ::-webkit-scrollbar{
            width: 10px;
            height: 10px;
        }
        ::-webkit-scrollbar-thumb{
            border-radius: 10px;
            -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
            background: #a8a5a5;
        }
        .workShop{
            position: absolute;
            top: 0;
            width: 100%;
            height: 25px;
            background-color: white;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="3">
                    <i-input v-model="q.devName" @on-enter="query" placeholder="管道名称"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.channelNo" @on-enter="query" placeholder="管道编号"></i-input>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                <i-button type="info" @click="addEqu"><i class="fa fa-bars"></i>&nbsp;设备档案资料</i-button>
                #if($shiro.hasPermission("devfile:imports"))
                <Upload ref="uploadFile"
                        action="../specialdevpressurechannel/import"
                        :format ="['xlsx','xls']"
                        :before-upload="handleBeforeUpload"
                        :show-upload-list="false"
                        :on-success="handleSuccess" :on-error="handleError"
                        :on-format-error="handleFormatError" class="sugon_upload_btn">
                    <i-button type="info"><i class="fa fa-hand-o-down"></i>&nbsp;导入</i-button>
                </Upload>
                <i-button type="info" @click="exportData"><i class="fa fa-hand-o-up"></i>&nbsp;导出</i-button>
                #end
                #if($shiro.hasPermission("specialdevpressurechannel:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("specialdevpressurechannel:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("specialdevpressurechannel:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>

        <!-- 使用单位树 -->
        <Row  :gutter="16" style="margin: 8px 0px 0px 1px;">
            <i-col :xs="3" :sm="3" :md="3" :lg="3">
                <div class="leftHeight" >
                    <div class="workShop">
                        <p class="text-center" style="font-size: 15px;">使用单位</p>
                    </div>
                    <div id="storeLayer" style="margin-top: 25px">
                        <ul id="storeTree" class="ztree"></ul>
                    </div>
                </div>
            </i-col>
            <i-col :xs="21" :sm="21" :md="21" :lg="21">
                <table  id="jqGrid"></table>
            </i-col>
        </Row>
    </div>
    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="specialDevPressureChannel" :rules="ruleValidate" :label-width="80">
            <Row>
                <i-col span="7">
                    <Form-item label="管道名称" prop="devName">
                        <i-input v-model="specialDevPressureChannel.devName" placeholder="管道名称"/>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="管道编号" prop="channelNo">
                        <i-input v-model="specialDevPressureChannel.channelNo" placeholder="管道编号"/>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="管道起始点" prop="channelRange">
                        <i-input v-model="specialDevPressureChannel.channelRange" placeholder="管道起始点"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="7">
                    <Form-item label="设计单位" prop="designUnit">
                        <i-input v-model="specialDevPressureChannel.designUnit" placeholder="设计单位"/>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="安装单位" prop="installUnit">
                        <i-input v-model="specialDevPressureChannel.installUnit" placeholder="安装单位"/>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="使用单位" prop="userDept">
                        <i-input v-model="specialDevPressureChannel.userDeptName" placeholder="使用单位" icon="md-arrow-dropdown-circle"  readonly @on-click="showUserDeptList" />
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="7">
                    <Form-item label="安装日期" prop="installDate">
                        <Date-picker v-model="specialDevPressureChannel.installDate" placeholder="安装日期"></Date-picker>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="投用日期" prop="enableDate">
                        <Date-picker v-model="specialDevPressureChannel.enableDate" placeholder="投用日期"></Date-picker>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="安全状况等级" prop="safetyStatusLevel">
                        <i-select v-model="specialDevPressureChannel.safetyStatusLevel + ''" placeholder="安全状况等级">
                            <i-option value="-1">请选择安全状况等级</i-option>
                            <i-option value="1">1级</i-option>
                            <i-option value="2">2级</i-option>
                            <i-option value="3">3级</i-option>
                        </i-select>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="7">
                    <Form-item label="公称直径mm" prop="diameter">
                        <i-input v-model="specialDevPressureChannel.diameter" placeholder="公称直径mm"/>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="公称壁厚mm" prop="thickness">
                        <i-input v-model="specialDevPressureChannel.thickness" placeholder="公称壁厚mm"/>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="管道长度mm" prop="channelLength">
                        <i-input v-model="specialDevPressureChannel.channelLength" placeholder="管道长度mm"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="7">
                    <Form-item label="压力(Mpa)" prop="pressure">
                        <i-input v-model="specialDevPressureChannel.pressure" placeholder="压力(Mpa)"/>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="温度℃" prop="temperature">
                        <i-input v-model="specialDevPressureChannel.temperature" placeholder="温度℃"/>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="介质" prop="substance">
                        <i-input v-model="specialDevPressureChannel.substance" placeholder="介质"/>
                    </Form-item>
                </i-col>
            </Row>

            <Row>
                <i-col span="7">
                    <Form-item label="管道材质" prop="channelMaterial">
                        <i-input v-model="specialDevPressureChannel.channelMaterial" placeholder="管道材质"/>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="焊口数量" prop="holeNum">
                        <i-input v-model="specialDevPressureChannel.holeNum" placeholder="焊口数量"/>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="管道级别" prop="channelLevel">
                        <i-select v-model="specialDevPressureChannel.channelLevel" placeholder="管道级别">
                            <i-option value="-1">请选择管道级别</i-option>
                            <i-option value="GC2">GC2</i-option>
                            <i-option value="GC3">GC3</i-option>
                        </i-select>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="7">
                    <Form-item label="使用状况" prop="state">
                        <i-select placeholder="使用状况" v-model="specialDevPressureChannel.state">
                            <i-option value="">正常</i-option>
                            <i-option value="">在用</i-option>
                            <i-option value="">未用</i-option>
                            <i-option value="">待报废</i-option>
                        </i-select>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="复检周期" prop="inspectInterval">
                        <i-select placeholder="复检周期" v-model="specialDevPressureChannel.inspectIntervalStr">
                            <i-option value="12">一年</i-option>
                            <i-option value="24">两年</i-option>
                            <i-option value="36">三年</i-option>
                        </i-select>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="最近一次检验日期" prop="latestInspectDate">
                        <Date-picker v-model="specialDevPressureChannel.latestInspectDate" placeholder="最近检验日期"></Date-picker>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="22">
                    <Form-item label="备注" prop="remark">
                        <i-input type="textarea" v-model="specialDevPressureChannel.remark" placeholder="备注"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <Form-item>
                    <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                    <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                    返回</i-button>
                    <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
                </Form-item>
            </Row>
        </i-form>
    </Card>
</div>
<!-- 使用部门树，新增或修改时选择使用部门用 -->
<div id="categoryLayer" style="display: none;padding:10px;">
    <ul id="categoryTree" class="ztree"></ul>
</div>
<script src="${rc.contextPath}/js/device/specialdevpressurechannel.js?_${date.systemTime}"></script>
</body>
</html>
